<?php
//整数的多种表示形式
echo 12345,"\n";//10进制
echo 0b1011, "\n";//2进制 0b开头     0~1
echo 567, "\n";
echo 0567, "\n";//8进制  0o或0      0~7
echo 0x2AF,"\n";//16进制  0x    0~9A-F
//算术运算符
echo 18 / 5, "\n";
echo 18 % 5, "\n";
//echo @18.9 % 5.8, "\n";
echo 3 **2.5, "\n";//3的2.5次方
//运算符的优先级
echo 5-6*2, "\n";//*优先级高
//运算符的结合性
echo 8/4*2,"\n";//从左向右
echo (-3)**2,"\n";//()优先级最高
//运算符的结合性
echo '2000'+123,"\n";
echo 123+'2000',"\n";
echo '123'+'2000',"\n";
echo 2000+'0o123',"\n";//不识别8进制
echo 2000+'0x123',"\n";
echo 2000+'+123',"\n";
echo 2000+'-123',"\n";
echo 2000+'123aaaa',"\n";
//echo 2000+'aaaa',"\n";//一开始就是非法数字，无法计算
echo 2000+'2e2',"\n";//一开始就是非法数字，无法计算
echo 2000+NULL,"\n";//一开始就是非法数字，无法计算
echo 2000+true,"\n";//一开始就是非法数字，无法计算
echo 2000+false,"\n";//一开始就是非法数字，无法计算
//
